const mongoose = require('mongoose')

// users集合
const Schema = mongoose.Schema

// 集合规范
const UserType = {
    username:String,
    password:String,
    gender:Number,  //性别 0,1,2
    introduction:String,  //简介
    avatar:String,
    role:Number  //管理员1  , 编辑2
}

// 创建模型
 const UserModel =  mongoose.model('user', new Schema(UserType))

module.exports = UserModel